package com.zjmzxfzhl.modules.purchase.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zjmzxfzhl.common.base.BaseService;
import com.zjmzxfzhl.modules.purchase.controller.vo.PurchaseProjectVo;
import com.zjmzxfzhl.modules.purchase.entity.PurchaseProject;

import java.io.File;
import java.util.List;

/**
 * Service
 *
 * @author 庄金明
 */
public interface PurchaseProjectService extends BaseService<PurchaseProject> {
    /**
     * 分页查询
     *
     * @param page
     * @param purchaseProject
     * @return
     */
    IPage<PurchaseProjectVo> list(IPage<PurchaseProjectVo> page, PurchaseProject purchaseProject);

    /**
     * 查询数据库项目信息（如果缺少则新增）
     * @param project
     * @return
     */
    PurchaseProject validPurchaseProject(PurchaseProject project);

    /**
     * 删除项目
     * @param ids
     */
    void deleteProjects(List<Long> ids);

    /**
     * 导出供应商详情
     * @param projectId
     * @return
     */
    File exportDetail(Long projectId);

    /**
     * 批量替换项目
     * @param oids
     * @param nid
     */
    void replaceProjects(List<Long> oids, Long nid);
}
